# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>

pkgname=totem-pl-parser
pkgver=3.26.6
pkgrel=2
pkgdesc="Simple GObject-based library to parse and save a host of playlist formats"
url="https://gitlab.gnome.org/GNOME/totem-pl-parser"
license=(LGPL)
arch=(x86_64)
depends=(glib2 libxml2 libarchive libgcrypt)
makedepends=(gobject-introspection git gtk-doc meson)
checkdepends=(gvfs)
provides=("totem-plparser=$pkgver-$pkgrel" libtotem-plparser{,-mini}.so)
conflicts=(totem-plparser)
replaces=("totem-plparser<=3.26.3-1")
_commit=1431f520fb82f98873c3870f2bbe8eba4d0e670a  # tags/V_3_26_6^0
source=("git+https://gitlab.gnome.org/GNOME/totem-pl-parser.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/^V_//;s/_/./g;s/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build -D enable-gtk-doc=true
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
}

# vim:set sw=2 sts=-1 et:
